package com.gxa.check.service;

import dto.ResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "order-service")
@RequestMapping("order02")
public interface OrderService {
    /**
     * 根据订单ID查询机械单
     * @return
     */
    @PostMapping("find/by/macOrderId")
    ResultDTO findByMacOrderId(@RequestParam Integer macOrderId);

    /**
     * 根据订单ID查询机械单
     * @return
     */
    @PostMapping("find/by/artOrderId")
    ResultDTO findByArtOrderId(@RequestParam Integer artOrderId);

    /**
     * 机械单待审核中
     * @param orderId
     * @return
     */
    @PostMapping("/manage/mac/in")
    ResultDTO manageMacIn(@RequestParam Integer orderId);

    /**
     * 修改订单状态为待出票
     * @param orderId
     * @return
     */
    @PostMapping("/manage/mac/pass")
    ResultDTO manageMacPass(@RequestParam Integer orderId);

    /**
     * 修改订单状态为未通过
     * @param orderId
     * @return
     */
    @PostMapping("/manage/mac/cancel")
    ResultDTO manageMacCancel(@RequestParam Integer orderId);

    /**
     * 通过人工单
     * @param orderId
     * @return
     */
    @PostMapping("/manage/art/pass")
    public ResultDTO manageArtPass(@RequestParam Integer orderId);

    /**
     * 拒绝人工单
     * @param orderId
     * @return
     */
    @PostMapping("/manage/art/cancel")
    public ResultDTO manageArtCancel(@RequestParam Integer orderId);
}
